<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .father {
            width: 400px;
            height: 400px;
            background-color: pink;
            overflow: hidden;
            margin: 100px auto;
        }

        .son {
            width: 200px;
            height: 200px;
            background-color: skyblue;
        }
    </style>
</head>

<body>
    <div class="father">
        <div class="son"></div>
    </div>
    <script>
        //mouseover和mouseenter最大的区别是: 
        // mouseover和mouseout： 会冒泡
        //mouseenter和mouseleave: 不会冒泡
        var father = document.querySelector('.father');
        father.addEventListener('mouseover', function () {
            console.log(11);
        })
    </script>
</body>

</html>